package com.yuqian.JavaSe.leetcode.easy;

import java.util.LinkedList;
import java.util.List;
import java.util.Queue;

/**
 * Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).

For example, this binary tree [1,2,2,3,4,4,3] is symmetric:

    1
   / \
  2   2
 / \ / \
3  4 4  3
But the following [1,2,2,null,3,null,3] is not:
    1
   / \
  2   2
   \   \
   3    3
   判断一个数是不是镜子树
 * @author yuqian
 *
 */
public class SymmetricTree {
	/* public boolean isSymmetric(TreeNode root) {
		 Queue< TreeNode> tree= new LinkedList<TreeNode>();
		 List<Integer> list = new LinkedList<Integer>(); 
	        if(root==null){
	        	tree.add(root);
	        }
	        while(tree.size()>0){
	        	TreeNode next=tree.remove();
	        	if(next==null){
	        		list.add(null);
	        	}else{
	        		list.add(root.val);
	        	}
	        	tree.add(next==null?null:next.left);
	        	tree.add(next==null?null:next.left);
	        }
	        
	    }*/
}
